/////////////////////////////////////////////////////////////////////////////
//
//	CDropEdit
//	Copyright 1997 Chris Losinger
//
//	This code is freely distributable and modifiable, as long as credit
//	is given to where it's due. Watch, I'll demonstrate :
//
//	shortcut expansion code modified from :
//	CShortcut, 1996 Rob Warner
//

#pragma once

// DropEdit.h : header file
//

#include <afxwin.h>
#include <shlobj.h>

/////////////////////////////////////////////////////////////////////////////
// CDropEdit window

enum USEDIRMODE
{
	USEDIR_FILE,
	USEDIR_FOLDER,
	USEDIR_BOTH
};

class CDropEdit : public CEdit
{
// Construction
public:
	CDropEdit();

// Attributes
public:

// Operations
public:
	inline void setUseDir(USEDIRMODE u)			{m_useDir=u;}
	inline USEDIRMODE getUseDir() const			{return m_useDir;}

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDropEdit)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDropEdit();

protected:
	CString ExpandShortcut(CString &inFile);

	// Generated message map functions
protected:
	//{{AFX_MSG(CDropEdit)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDropFiles(HDROP dropInfo);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

	USEDIRMODE	m_useDir;	// 0: file / 1: dir / 2(else)any
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
